New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-copy-to-clipboard

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-copy-to-clipboard

Copy to clipboard Vue component

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.6K
increased by136.09%
Maintainers
1
Weekly downloads
 
Created
Source

vue-copy-to-cliboard

Copy to clipboard Vue component

Use

$ npm install vue-copy-to-clipboard
or
$ yarn add vue-copy-to-clipboard

Examples

// by jsx
import CopyToClipboard from 'vue-copy-to-clipboard'

export default {
  data () {
    return {
      text: 'is copy content'
    }
  },
  render (h) {
    return (
      <div>
        <CopyToClipboard text={this.text} onCopy={(result) => {
          console.log('onCopy', result)
        }}>
          <Button>Copy to Clipboard</Button>
        </CopyToClipboard>
      </div>
    )
  }
}
<template>
  <div>
    <copy-to-clipboard :text="text" @copy="handleCopy">
      <a-button>Copy to Clipboard</a-button>
    </copy-to-clipboard>
  </div>
</template>

<script>
// by template.vue
import CopyToClipboard from 'vue-copy-to-clipboard'

export default {
  components: {
    CopyToClipboard
  },
  data () {
    return {
      text: '这里可以动态生成内容'
    }
  },
  methods: {
    handleCopy (result) {
      console.log('onCopy', result)
    }
  }
}
</script>

Keywords

FAQs

Package last updated on 09 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc